home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
031-040
/
amok31
/
environment
/
dossupport.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
647b
|
42 lines
IMPLEMENTATION MODULE DosSupport;
FROM SYSTEM IMPORT ADR;
FROM Dos IMPORT Open, Close, CurrentDir, Lock, UnLock,
FileLockPtr, sharedLock, newFile;
VAR L : FileLockPtr;
PROCEDURE OpenCon (win : WinNam) : ID;
BEGIN
RETURN Open (ADR(win), newFile);
END OpenCon;
PROCEDURE CloseCon (k : ID);
BEGIN
IF k # NIL THEN
L := CurrentDir (L);
Close (k)
END
END CloseCon;
PROCEDURE CD (Dir : ARRAY OF CHAR) : BOOLEAN;
VAR l : FileLockPtr;
BEGIN
l := Lock (ADR(Dir), sharedLock);
IF l # NIL THEN
l := CurrentDir (l);
UnLock (l);
RETURN TRUE
END;
RETURN FALSE
END CD;
BEGIN
L := Lock (0, sharedLock);
END DosSupport.Mod